<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .box{
            display: flex;
            flex-wrap: wrap; 
            width: 600px;
            margin: 20px auto;

        }
        .box li{
            list-style: none;
        }
        .box>li {
             width: 100px;
            height: 100px;
            margin: 0 20px 20px 0;

        }
        .box li img{
            width: 100%;
            height: 100%;
            border: 3px solid rgb(39,202,213);
            border-radius: 10px 0px 10px 0px;

        }
    </style>
</head>
<body>
  <script>
    let num = +prompt("请输入要展示的图片数量(1 ~ 20):")
    
    document.write(`<div class ="box">`) 
    for(let i = 0;i<num ;i++){
        document.write(
            `<li>
            <img src ="/作业/王者荣耀/images/${i+1}.webp"/>
            </li>`
            )
        }
    document.write('</div>')
  </script>
</body>
</html> 